package com.wwwarehouse.contract.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * Created by clannad.shao on 2017/11/6.
 */

public class QueryExpressBean implements Parcelable {


    /**
     * demanderName :
     * demanderUkid :
     * orderId : D32083300000001044
     * orderTime : 2017-09-14 13:15:14
     * packageNum : 1
     * packageTrackNum : {"WAIT_RECEIVE":1}
     * supplierName :
     * supplierUkid :
     * trackList : [{"deliveryTime":"2012-02-03 00:00:00","expressName":"圆通速递","expressNo":"yd111111114","lastTrackDesc":"","lastTrackStatus":"WAIT_RECEIVE","lastTrackTime":"","packageUkid":42133100000007002}]
     */

    private String demanderName;
    private String demanderUkid;
    private String orderId;
    private String orderTime;
    private int packageNum;
    private PackageTrackNumBean packageTrackNum;
    private String supplierName;
    private String supplierIcon;
    private String supplierUkid;
    private ArrayList<TrackListBean> trackList;

    public String getDemanderName() {
        return demanderName;
    }

    public void setDemanderName(String demanderName) {
        this.demanderName = demanderName;
    }

    public String getDemanderUkid() {
        return demanderUkid;
    }

    public void setDemanderUkid(String demanderUkid) {
        this.demanderUkid = demanderUkid;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public int getPackageNum() {
        return packageNum;
    }

    public void setPackageNum(int packageNum) {
        this.packageNum = packageNum;
    }

    public PackageTrackNumBean getPackageTrackNum() {
        return packageTrackNum;
    }

    public void setPackageTrackNum(PackageTrackNumBean packageTrackNum) {
        this.packageTrackNum = packageTrackNum;
    }

    public String getSupplierIcon() {
        return supplierIcon;
    }

    public void setSupplierIcon(String supplierIcon) {
        this.supplierIcon = supplierIcon;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getSupplierUkid() {
        return supplierUkid;
    }

    public void setSupplierUkid(String supplierUkid) {
        this.supplierUkid = supplierUkid;
    }

    public ArrayList<TrackListBean> getTrackList() {
        return trackList;
    }

    public void setTrackList(ArrayList<TrackListBean> trackList) {
        this.trackList = trackList;
    }

    public static class PackageTrackNumBean implements Parcelable{
        /**
         * WAIT_RECEIVE : 1
         */

        private int WAIT_RECEIVE;
        private int SIGN_IN;

        public int getWAIT_RECEIVE() {
            return WAIT_RECEIVE;
        }

        public void setWAIT_RECEIVE(int WAIT_RECEIVE) {
            this.WAIT_RECEIVE = WAIT_RECEIVE;
        }

        public int getSIGN_IN() {
            return SIGN_IN;
        }

        public void setSIGN_IN(int SIGN_IN) {
            this.SIGN_IN = SIGN_IN;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.WAIT_RECEIVE);
            dest.writeInt(this.SIGN_IN);
        }

        public PackageTrackNumBean() {
        }

        protected PackageTrackNumBean(Parcel in) {
            this.WAIT_RECEIVE = in.readInt();
            this.SIGN_IN = in.readInt();
        }

        public static final Creator<PackageTrackNumBean> CREATOR = new Creator<PackageTrackNumBean>() {
            @Override
            public PackageTrackNumBean createFromParcel(Parcel source) {
                return new PackageTrackNumBean(source);
            }

            @Override
            public PackageTrackNumBean[] newArray(int size) {
                return new PackageTrackNumBean[size];
            }
        };
    }

    public static class TrackListBean implements Parcelable{
        /**
         * deliveryTime : 2012-02-03 00:00:00
         * expressName : 圆通速递
         * expressNo : yd111111114
         * lastTrackDesc :
         * lastTrackStatus : WAIT_RECEIVE
         * lastTrackTime :
         * packageUkid : 42133100000007002
         */


        private String deliveryTime;
        private String expressName;
        private String expressNo;
        private String lastTrackDesc;
        private String lastTrackStatus;
        private String lastTrackTime;
        private String packageUkid;

        public String getDeliveryTime() {
            return deliveryTime;
        }

        public void setDeliveryTime(String deliveryTime) {
            this.deliveryTime = deliveryTime;
        }

        public String getExpressName() {
            return expressName;
        }

        public void setExpressName(String expressName) {
            this.expressName = expressName;
        }

        public String getExpressNo() {
            return expressNo;
        }

        public void setExpressNo(String expressNo) {
            this.expressNo = expressNo;
        }

        public String getLastTrackDesc() {
            return lastTrackDesc;
        }

        public void setLastTrackDesc(String lastTrackDesc) {
            this.lastTrackDesc = lastTrackDesc;
        }

        public String getLastTrackStatus() {
            return lastTrackStatus;
        }

        public void setLastTrackStatus(String lastTrackStatus) {
            this.lastTrackStatus = lastTrackStatus;
        }

        public String getLastTrackTime() {
            return lastTrackTime;
        }

        public void setLastTrackTime(String lastTrackTime) {
            this.lastTrackTime = lastTrackTime;
        }

        public String getPackageUkid() {
            return packageUkid;
        }

        public void setPackageUkid(String packageUkid) {
            this.packageUkid = packageUkid;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.deliveryTime);
            dest.writeString(this.expressName);
            dest.writeString(this.expressNo);
            dest.writeString(this.lastTrackDesc);
            dest.writeString(this.lastTrackStatus);
            dest.writeString(this.lastTrackTime);
            dest.writeString(this.packageUkid);
        }

        public TrackListBean() {
        }

        protected TrackListBean(Parcel in) {
            this.deliveryTime = in.readString();
            this.expressName = in.readString();
            this.expressNo = in.readString();
            this.lastTrackDesc = in.readString();
            this.lastTrackStatus = in.readString();
            this.lastTrackTime = in.readString();
            this.packageUkid = in.readString();
        }

        public static final Creator<TrackListBean> CREATOR = new Creator<TrackListBean>() {
            @Override
            public TrackListBean createFromParcel(Parcel source) {
                return new TrackListBean(source);
            }

            @Override
            public TrackListBean[] newArray(int size) {
                return new TrackListBean[size];
            }
        };
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.demanderName);
        dest.writeString(this.demanderUkid);
        dest.writeString(this.orderId);
        dest.writeString(this.orderTime);
        dest.writeInt(this.packageNum);
        dest.writeParcelable(this.packageTrackNum, flags);
        dest.writeString(this.supplierName);
        dest.writeString(this.supplierIcon);
        dest.writeString(this.supplierUkid);
        dest.writeTypedList(this.trackList);
    }

    public QueryExpressBean() {
    }

    protected QueryExpressBean(Parcel in) {
        this.demanderName = in.readString();
        this.demanderUkid = in.readString();
        this.orderId = in.readString();
        this.orderTime = in.readString();
        this.packageNum = in.readInt();
        this.packageTrackNum = in.readParcelable(PackageTrackNumBean.class.getClassLoader());
        this.supplierName = in.readString();
        this.supplierIcon = in.readString();
        this.supplierUkid = in.readString();
        this.trackList = in.createTypedArrayList(TrackListBean.CREATOR);
    }

    public static final Creator<QueryExpressBean> CREATOR = new Creator<QueryExpressBean>() {
        @Override
        public QueryExpressBean createFromParcel(Parcel source) {
            return new QueryExpressBean(source);
        }

        @Override
        public QueryExpressBean[] newArray(int size) {
            return new QueryExpressBean[size];
        }
    };
}
